package com.twu.biblioteca;

import java.util.ArrayList;

class Customer{

    ArrayList<String> books = new ArrayList<String>();
    ArrayList<String> movies = new ArrayList<String>();

    protected String libraryNumber;
    protected String name;
    protected String email;
    protected String phone;

    public Customer(String aLibraryNumber, String aName, String anEmail, String aPhone){
        libraryNumber = aLibraryNumber;
        name = aName;
        email = anEmail;
        phone = aPhone;
    }

    protected void checkoutBook(String title){
        books.add(title);
    }

    protected void returnBook(String title){
        books.remove(title);
    }

    protected boolean hasBook(String title){
        return (books.indexOf(title) != -1);
    }

    protected void checkoutMovie(String title){
        movies.add(title);
    }

    protected void returnMovie(String title){
        movies.remove(title);
    }

    protected boolean hasMovie(String title){
        return (movies.indexOf(title) != -1);
    }

    public String userInformation(){
        return
        "Library Number: " + libraryNumber +"\n" +
        "Name: " + name +"\n" +
        "E-mail Address: " + email +"\n" +
        "Phone Number: " + phone +"\n";
    }

}